﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pepper.Temple.WPF.Core.Interfaces.Services
{
    /// <summary>
    /// 类型实例获取接口
    /// 根据契约类型和键值在运行时动态获取容器注册的类型实例
    /// 为了突破容器框架的构造方法注入的难以应对变化问题
    /// 抽象定义实现对容器技术细节的屏蔽
    /// </summary>
    public interface ITypesFactory
    {
        T GetTypeInstance<T>() where T : class;

        T GetTypeInstance<T>(string key) where T : class;

        Dictionary<string,T> GetTypeInstancesByKeys<T>(IEnumerable<string> keys) where T : class;
    }
}
